package com.test.mapper;

import com.test.pojo.AdminUser;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

@Repository
public interface AdminUserMapper {
    // 如果不指定实体类的映射关系和数据库字段的映射关系，结果会是空值 第二种是在Mybatis的配置文件中指定 第三种在Mapper文件中指定
    //@Results({
    //        @Result(property = "adminId", column = "admin_id", id = true),
    //        @Result(property = "adminName", column = "admin_name"),
    //        @Result(property = "adminNickname", column = "admin_nickname"),
    //        @Result(property = "adminPassword", column = "admin_password"),
    //        @Result(property = "adminProfilePictureSrc", column = "admin_profile_picture_src")
    //})
    //@Select("SELECT * FROM adminuser WHERE admin_name = #{adminName}  " +
    //        "AND admin_password = #{adminPassword} ")
    AdminUser doLogin(@Param("adminName") String adminName, @Param("adminPassword") String adminPassword);


}